package org.example;

import org.example.lost.LostApplication;
import org.example.lost.entity.UserInfo;
import org.example.lost.mapper.UserMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.ClassUtils;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * @Author hxy
 * @Date 2021/3/12 10:01
 * @Version 1.0
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = {LostApplication.class})
public class test {
    /*@Autowired
    PasswordEncoder passwordEncoder;*/

    @Autowired
    UserMapper userMapper;

    @Test
    public void Test(){
        /*String encode = passwordEncoder.encode("123456");
        System.out.println(encode);*/
    }

    @Test
    public void Test1(){
        String images = ClassUtils.getDefaultClassLoader().getResource("mapper").getPath();
        System.out.println(images);
    }

    @Test
    public void Test2(){
        UserInfo userInfo = userMapper.selectByPhone("15775024496");
        System.out.println(userInfo.toString());
    }


}